package com.cosina.game.robodefence.ui.drawable;

import android.graphics.Canvas;

import com.cosina.game.robodefence.core.BattleEngine;
import com.cosina.game.robodefence.ui.ImageManager;

public class TowerDrawable extends BaseDrawable{

	@Override
	public void draw(Canvas canvas) {
		int[][] data = BattleEngine.field.getFieldData();
		for (int y = 0; y < data.length; y++) {
			for (int x = 0; x < data[0].length; x++) {
				if (data[y][x] > 0) {
					ImageManager.drawTower(data[y][x], 12, canvas, x * 40,
							y * 40);
				}
			}
		}
	}
}
